Skip to content

Conversation

boomanaiden154
Copy link
Contributor

Given this is a syscall wrapper and not in POSIX, this should actually be defined under the Linux standard.

https://man7.org/linux/man-pages/man2/getcpu.2.html confirms.

Given this is a syscall wrapper and not in POSIX, this should actually
be defined under the Linux standard.

https://man7.org/linux/man-pages/man2/getcpu.2.html confirms.
@llvmbot
Copy link
Member

llvmbot commented Aug 16, 2025

@llvm/pr-subscribers-libc

Author: Aiden Grossman (boomanaiden154)

Changes

Given this is a syscall wrapper and not in POSIX, this should actually be defined under the Linux standard.

https://man7.org/linux/man-pages/man2/getcpu.2.html confirms.


Full diff: https://github.com/llvm/llvm-project/pull/153982.diff

1 Files Affected:

  • (modified) libc/include/sched.yaml (+1-1)
diff --git a/libc/include/sched.yaml b/libc/include/sched.yaml
index f14799ddf33fa..8014aa7ed61fc 100644
--- a/libc/include/sched.yaml
+++ b/libc/include/sched.yaml
@@ -20,7 +20,7 @@ functions:
       - type: const cpu_set_t *
   - name: getcpu
     standards:
-      - POSIX
+      - Linux
     return_type: int
     arguments:
       - type: unsigned int *

@boomanaiden154 boomanaiden154 merged commit 29d49c8 into llvm:main Aug 16, 2025
21 checks passed
@boomanaiden154 boomanaiden154 deleted the sched-getcpu-correct-standard branch August 16, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants